/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package View;

import Utilidades.Utilidades;
import Reportes.*;

/**
 *
 * @author User
 */
public class Menu_view extends javax.swing.JFrame {

    Utilidades objUtil = new Utilidades();
    ReporteEmpresasExcel objReporEmp = new ReporteEmpresasExcel();
    ReporteFuncionariosExcel objReporFun = new ReporteFuncionariosExcel();
    ReporteSedesExcel objReporSedes = new ReporteSedesExcel();
    ReportePrestamosExcel objReporPrestamos = new ReportePrestamosExcel();
    ReporteResumenConsolidadoCalificacionExcel objcalificacion = new ReporteResumenConsolidadoCalificacionExcel();
    ReporteResumenConsolidadoTituloExcel objtitulos = new ReporteResumenConsolidadoTituloExcel();

    /**
     * Creates new form Menu_view
     */
    public Menu_view() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jDesktopPane1 = new javax.swing.JDesktopPane();
        jMenuBar1 = new javax.swing.JMenuBar();
        menuAdministracion = new javax.swing.JMenu();
        itemEmpresa = new javax.swing.JMenuItem();
        itemSede = new javax.swing.JMenuItem();
        itemFuncionario = new javax.swing.JMenuItem();
        jMenuItem5 = new javax.swing.JMenuItem();
        itemSalir = new javax.swing.JMenuItem();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenuItem4 = new javax.swing.JMenuItem();
        jMenuItem6 = new javax.swing.JMenuItem();
        jMenuItem7 = new javax.swing.JMenuItem();
        jMenuItem8 = new javax.swing.JMenuItem();
        menuConfiguracion = new javax.swing.JMenu();
        itemValores = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setResizable(false);
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
        getContentPane().add(jDesktopPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 990, 640));

        jMenuBar1.setMaximumSize(new java.awt.Dimension(229, 900));

        menuAdministracion.setText("Administración");

        itemEmpresa.setText("Empresas");
        itemEmpresa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemEmpresaActionPerformed(evt);
            }
        });
        menuAdministracion.add(itemEmpresa);

        itemSede.setText("Sedes");
        itemSede.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemSedeActionPerformed(evt);
            }
        });
        menuAdministracion.add(itemSede);

        itemFuncionario.setText("Funcionarios");
        itemFuncionario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemFuncionarioActionPerformed(evt);
            }
        });
        menuAdministracion.add(itemFuncionario);

        jMenuItem5.setText("Documentos");
        jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem5ActionPerformed(evt);
            }
        });
        menuAdministracion.add(jMenuItem5);

        itemSalir.setText("Salir");
        itemSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemSalirActionPerformed(evt);
            }
        });
        menuAdministracion.add(itemSalir);

        jMenuBar1.add(menuAdministracion);

        jMenu1.setText("Reportes");

        jMenuItem1.setText("Listado Empresas Activas");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem1);

        jMenuItem2.setText("Listado Empresas Inactivas");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem2);

        jMenuItem3.setText("Listado Funcionarios");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem3);

        jMenuItem4.setText("Listado Sedes");
        jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem4ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem4);

        jMenuItem6.setText("Consolidado de Prestamos");
        jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem6ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem6);

        jMenuItem7.setText("Consolidado Titulos");
        jMenuItem7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem7ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem7);

        jMenuItem8.setText("Consolidado Calificación");
        jMenuItem8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem8ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem8);

        jMenuBar1.add(jMenu1);

        menuConfiguracion.setText("Configuracion");

        itemValores.setText("Lista de Valores");
        itemValores.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemValoresActionPerformed(evt);
            }
        });
        menuConfiguracion.add(itemValores);

        jMenuBar1.add(menuConfiguracion);

        setJMenuBar(jMenuBar1);

        setSize(new java.awt.Dimension(991, 684));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void itemEmpresaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemEmpresaActionPerformed
        // TODO add your handling code here:
        Company_view jfCompany = new Company_view();
        jfCompany.setBounds(100, 20, 710, 550);
        jfCompany.setVisible(true);
        jDesktopPane1.add(jfCompany, 0);
    }//GEN-LAST:event_itemEmpresaActionPerformed

    private void itemSedeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemSedeActionPerformed
        // TODO add your handling code here:
        Headquarters_view jfHeadquarters = new Headquarters_view();
        jfHeadquarters.setBounds(120, 20, 696, 539);
        jfHeadquarters.setVisible(true);
        jDesktopPane1.add(jfHeadquarters, 0);
    }//GEN-LAST:event_itemSedeActionPerformed

    private void itemFuncionarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemFuncionarioActionPerformed
        // TODO add your handling code here:
        Functionary_view jfFunctionary = new Functionary_view();
        jfFunctionary.setBounds(140, 20, 725, 560);
        jfFunctionary.setVisible(true);
        jDesktopPane1.add(jfFunctionary, 0);
    }//GEN-LAST:event_itemFuncionarioActionPerformed

    private void itemValoresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemValoresActionPerformed
        // TODO add your handling code here:
        List_view jfList = new List_view();
        jfList.setBounds(160, 20, 723, 489);
        jfList.setVisible(true);
        jDesktopPane1.add(jfList, 0);
    }//GEN-LAST:event_itemValoresActionPerformed

    private void itemSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemSalirActionPerformed
        System.exit(0);
    }//GEN-LAST:event_itemSalirActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        // TODO add your handling code here:
        objReporEmp.generarEmpresasActivas("Activo");
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        // TODO add your handling code here:
        objReporEmp.generarEmpresasInactivas("Inactiva");
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        // TODO add your handling code here:
        objReporFun.generarFuncionarios();
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
        // TODO add your handling code here:
        objReporSedes.generarSedes();
    }//GEN-LAST:event_jMenuItem4ActionPerformed

    private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed
        // TODO add your handling code here:
        Document_view jfDoc = new Document_view();
        jfDoc.setBounds(160, 20, 723, 700);
        jfDoc.setVisible(true);
        jDesktopPane1.add(jfDoc, 0);
    }//GEN-LAST:event_jMenuItem5ActionPerformed

    private void jMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem6ActionPerformed
        // TODO add your handling code here:
        objReporPrestamos.generarPrestamos("Prestamo");
    }//GEN-LAST:event_jMenuItem6ActionPerformed

    private void jMenuItem7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem7ActionPerformed
        // TODO add your handling code here:
        objtitulos.generarConsolidadoTitulos();
    }//GEN-LAST:event_jMenuItem7ActionPerformed

    private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem8ActionPerformed
        // TODO add your handling code here:
        objcalificacion.generarConsolidadoCalificacion();
    }//GEN-LAST:event_jMenuItem8ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Menu_view.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Menu_view.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Menu_view.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Menu_view.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Menu_view().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem itemEmpresa;
    private javax.swing.JMenuItem itemFuncionario;
    private javax.swing.JMenuItem itemSalir;
    private javax.swing.JMenuItem itemSede;
    private javax.swing.JMenuItem itemValores;
    public static javax.swing.JDesktopPane jDesktopPane1;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JMenuItem jMenuItem6;
    private javax.swing.JMenuItem jMenuItem7;
    private javax.swing.JMenuItem jMenuItem8;
    private javax.swing.JMenu menuAdministracion;
    private javax.swing.JMenu menuConfiguracion;
    // End of variables declaration//GEN-END:variables
}
